<?php
/**                                          
 * 用户设置
 * @author next
 * @version 1.0
 * create Date 2013-11-20
 */
class UserAppsetupModel extends Model {
	
	/**
	 * 获取用户设置	
	 * @param $uids 用户ID
	 * @param $keyname key
	 */
	function getUserAppSetupUserID($uids,$keyname) 	{
		$userAppSetupUserID = $this->where("uid in (".implode(",",$uids).") and `key`='".$keyname."' and `value`='0'")->field('uid')->select();
		return $userAppSetupUserID;
	}
	
	/**
	 * 获取用户设置
	 * @param $userid 用户ID
	 * @param $keyname key
	 */
	function getUserAppSetupList($userid,$keyname) 	{
		$userAppSetupList = $this->where("uid=".$userid."")->field('`key` as keyname,`value` as keyvalue')->select();
		return $userAppSetupList;
	}
}
?>